package com.clas.liu.myapplication.view.activity.impl;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.clas.liu.myapplication.R;
import com.clas.liu.myapplication.presenter.impl.BasePresenter;

/**
 * Created by liu on 2019/5/22.
 */

public class AdministratorActivity extends BaseActivity implements View.OnClickListener {

    private ImageView back;
    private RelativeLayout publishLayout;
    private RelativeLayout userLayout;
    private RelativeLayout infoLayout;
    private RelativeLayout bannedLayout;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_administrator_layout);
        findView();
        setListener();
    }

    private void setListener() {
        back.setOnClickListener(this);
        publishLayout.setOnClickListener(this);
        userLayout.setOnClickListener(this);
        infoLayout.setOnClickListener(this);
        bannedLayout.setOnClickListener(this);
    }

    private void findView() {
        back = findViewById(R.id.administrator_back_bt);
        publishLayout = findViewById(R.id.administrator_publish_notice_layout);
        userLayout = findViewById(R.id.administrator_reported_user_layout);
        infoLayout = findViewById(R.id.administrator_reported_info_layout);
        bannedLayout = findViewById(R.id.administrator_banned_user_layout);
    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.administrator_back_bt:
                finish();
                break;
            case R.id.administrator_publish_notice_layout:
                startActivity(new Intent(this,PublishNoticeActivity.class));
                break;
            case R.id.administrator_reported_user_layout:
                startActivity(new Intent(this,ReportedUserActivity.class));
                break;
            case R.id.administrator_reported_info_layout:
                startActivity(new Intent(this,ReportedInfoActivity.class));
                break;
            case R.id.administrator_banned_user_layout:
                startActivity(new Intent(this,BandedUserActivity.class));
                break;
        }
    }
}
